this.emit('changed');
},
- activate: function() {
- this.emit('activate');
+ activate: function(interactive) {
+ this.emit('activate', !!interactive);
},
_getXkbId: function() {
_finish : function() {
this.parent();
- this._items[this._selectedIndex].activate();
+ this._items[this._selectedIndex].activate(true);
},
});
while (!(is = this._inputSources[nextIndex]))
nextIndex += 1;
- is.activate();
+ is.activate(true);
return true;
},
this._changePerWindowSource();
},
- _activateInputSource: function(is) {
+ _activateInputSource: function(is, interactive) {
KeyboardManager.holdKeyboard();
this._keyboardManager.apply(is.xkbId);
this._updateMruSources();
if (this._mruSources.length > 0)
- this._mruSources[0].activate();
+ this._mruSources[0].activate(false);
// All ibus engines are preloaded here to reduce the launching time
// when users switch the input sources.
}
if (window._currentSource)
- window._currentSource.activate();
+ window._currentSource.activate(false);
},
_sourcesPerWindowChanged: function() {
let is = this._inputSourceManager.inputSources[i];
let menuItem = new LayoutMenuItem(is.displayName, is.shortName);
- menuItem.connect('activate', Lang.bind(is, is.activate));
+ menuItem.connect('activate', function() {
+ is.activate(true);
+ });
+
let indicatorLabel = new St.Label({ text: is.shortName,
visible: false });